﻿@model Comisiones.Models.PuntoServicio

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('#buscarLocal').load('@Url.Action("BuscarLocal","Locales")');
});    
    
</script>

<div id="buscarLocal"></div>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>PuntoServicio</legend>

        <!--local y comercio-->
            @Html.HiddenFor(model => model.com_idComercio, new { id = "idcomercio" })
            @Html.HiddenFor(model => model.loc_idLocal, new { id = "idlocal" })
        <!-- -->

        <div class="editor-label">
            @Html.LabelFor(model => model.ter_idTerminal, "terminal")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ter_idTerminal", String.Empty)
            @Html.ValidationMessageFor(model => model.ter_idTerminal)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.uni_idUnidadNegocio, "unidadNegocio")
        </div>
        <div class="editor-field">
            @Html.DropDownList("uni_idUnidadNegocio", String.Empty)
            @Html.ValidationMessageFor(model => model.uni_idUnidadNegocio)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.psv_codigoDIR)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.psv_codigoDIR)
            @Html.ValidationMessageFor(model => model.psv_codigoDIR)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
